package com.hotel.mapper;

import com.hotel.pojo.Orders;
import com.hotel.pojo.Temporary;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TemporaryMapper {

    void addTemporary(Temporary temporary);

    @Select("select count(1) from temporary where name=#{userName}")
    Long getTotal(String userName);

    List<Temporary> temporaryList(@Param("start") int start,
                                 @Param("size")int size,
                                 @Param("query")String query,
                                 @Param("userName")String userName);

    @Delete("delete from temporary where id = #{id}")
    void deleteTemporary(Integer id);

    void updateStatus(Integer id);

    @Select("select * from temporary")
    List<Temporary> findAll();
}
